/*
** my_put_nbr.c for  in /home/vanet_c//piscine/Jour_03
** 
** Made by charles-edouard vanet
** Login   <vanet_c@epitech.net>
** 
** Started on  Wed Oct  3 17:07:30 2012 charles-edouard vanet
** Last update Tue Dec 11 19:47:34 2012 charles-edouard vanet
*/

void	my_put_nbr(int nb)
{
  if (nb < 0)
    {
      my_putchar('-');
      nb = nb * -1;
    }
  if (nb >= 10)
    {
      my_put_nbr(nb / 10);
      my_put_nbr(nb % 10);
    }
  else
    my_putchar(nb + '0');
}

void	my_put_nbr_error(int nb)
{
  if (nb < 0)
    {
      my_fd_putchar('-', 2);
      nb = nb * -1;
    }
  if (nb >= 10)
    {
      my_put_nbr(nb / 10);
      my_put_nbr(nb % 10);
    }
  else
    my_fd_putchar(nb + '0', 2);
}
